#pragma once
#include "Anim.h"
#include "Model.h"

class BasePlayer;

enum PlayerBodyPart{
	HAIR,
	FACE,
	SHOES,
	UNIFORM,
	BODY,
	SHORTS,
	BODY_PARTS_COUNT
};

class PlayerModel : public Model
{

public:
	PlayerModel(BasePlayer* owner);
	virtual ~PlayerModel();

	int GetPlayerHairTextureID(){ return VBOIDs[HAIR].TextureID;}
	void SetPlayerHairTextureID(const int hairID){ VBOIDs[HAIR].TextureID = hairID; }

	int GetPlayerFaceTextureID(){ return VBOIDs[FACE].TextureID;}
	void SetPlayerFaceTextureID(const int faceID){ VBOIDs[FACE].TextureID = faceID; }

	int GetPlayerShoesTextureID(){ return VBOIDs[SHOES].TextureID;}
	void SetPlayerShoesTextureID(const int shoesID){ VBOIDs[SHOES].TextureID = shoesID; }

	int GetPlayerUniformTextureID(){ return VBOIDs[UNIFORM].TextureID;}
	void SetPlayerUniformTextureID(const int uniformID){ VBOIDs[UNIFORM].TextureID = uniformID; }

	int GetPlayerBodyTextureID(){ return VBOIDs[BODY].TextureID;}
	void SetPlayerBodyTextureID(const int bodyID){ VBOIDs[BODY].TextureID = bodyID; }

	int GetPlayerShortsTextureID(){ return VBOIDs[SHORTS].TextureID;}
	void SetPlayerShortsTextureID(const int shortsID){ VBOIDs[SHORTS].TextureID = shortsID; }

	void Draw(const sf::Vector2f& offset, const sf::Vector2f& facing);

protected:
	void RenderSkele();
	void RenderAura();

private:
	BasePlayer* m_owner;

	Anim m_anim;
	int m_frame;

};
